class Solution {
public:
    int findKthLargest(vector<int>& nums, int k) {
        //利用priority_queue
       //将nums的元素放入优先级队列中
       priority_queue<int> pq;
       for(auto e:nums)
       {
        pq.push(e);
       }
       for(size_t i=0;i<k-1;++i)
       {
        pq.pop();
       }
       return pq.top();
        
    }
};
